import http from './http'

// add note
const addNote = (data) => {
    return http({
        url: "note",
        method: "post",
        data
    })
}

// del note
const delNote = (data) => {
    return http({
        url: `note/${data._id}`,
        method: "delete"
    })
}

// put note
const putNote = (data) => {
    return http({
        url: `note/${data._id}`,
        method: "put",
        data
    })
}

// notes
const getNotes = () => {
    return http({
        url: `notes`,
        method: "get",
    })
}


export {
    addNote,
    delNote,
    putNote,
    getNotes
}
